﻿using Localization.Resources.AbpUi;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
//using FeatureManagement;
//using FeatureManagement.Localization;
using Xms.Abp.Modularity;
using TenantManagement.Localization;
using Xms.Abp.AspNetCore.Mvc;

namespace TenantManagement;

[DependsOn(
    typeof(TenantManagementApplicationContractsModule),
    //typeof(FeatureManagementHttpApiModule),
    typeof(XmsAbpAspNetCoreMvcModule)
    )]
public class TenantManagementHttpApiModule : XmsModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        PreConfigure<IMvcBuilder>(mvcBuilder =>
        {
            mvcBuilder.AddApplicationPartIfNotExists(typeof(TenantManagementHttpApiModule).Assembly);
        });
    }

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        Configure<AbpLocalizationOptions>(options =>
        {
            options.Resources
                .Get<TenantManagementResource>()
                .AddBaseTypes(
                    //typeof(FeatureManagementResource),
                    typeof(AbpUiResource));
        });
    }
}
